from google.appengine.api import users
import settings


def check(self):
    if settings.ADMIN_USERS and settings.ADMIN_USERS[0] == '*':
        return 'guest'
    user = users.get_current_user()
    output = False
    if user:
        user_email = user.email().lower()
        if user_email in settings.ADMIN_USERS:
            output = user_email
    return output


#        user = helpers.user.check(self)
#        if not user:
#            pass
#            login_url = users.create_login_url('/alerts')
#            self.redirect(login_url)
